﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace Lottery.Test
{
    public class ClsShowPropery
    {
        public static string ShowProperty(object o)
        {
            //if(o==null)
            //    return string.Empty;
            var s = new StringBuilder();
            Type type = o.GetType();
            PropertyInfo[] props = type.GetProperties();
            
            foreach (var p in props)
            {
                s.Append(p.Name + " : " + p.GetValue(o, null) + "\r\n");
            }
            return s.ToString();
        }
    }
}
